#!/usr/bin/env perl

use utf8;
use strict;
use 5.010;

my $number = int(1 + rand 100);
my $win_msg;

while(<>){
	last if /quit|exit|\A\n/i;
	chomp;
	if ($_ == $number) {
		$win_msg = "You Win , secret number = $number\n";
		last;
	}
	print $_ > $number ? "Too Hight\n" : "Too Low\n";
}

print $win_msg // '';

print "Program exit ...\n";
